﻿using System;
using System.Collections.Generic;
using System.Linq;
using System.Text;
using NHibernate;
using NHibernate.Type;

namespace NHTools.Tools
{
    class NHInterceptor : EmptyInterceptor
    {
        public override bool OnSave(object entity, object id, object[] state, string[] propertyNames, IType[] types)
        {
            entity.GetType().GetMethod("CheckCollections").Invoke(entity, null);
            return base.OnSave(entity, id, state, propertyNames, types);
        }
    }
}
